home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7992 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  789 b 

  1. Path: prodigy.com!usenet
  2. From: ELFW44A@prodigy.com (Craig Bellet)
  3. Newsgroups: comp.lang.c
  4. Subject: Towers of Hanoi
  5. Date: 1 Mar 1996 00:36:23 GMT
  6. Organization: Prodigy Services Company  1-800-PRODIGY
  7. Distribution: world
  8. Message-ID: <4h5gq7$bmo@useneta1.news.prodigy.com>
  9. NNTP-Posting-Host: inugap3.news.prodigy.com
  10. X-Newsreader: Version 1.2
  11.  
  12. Learning to program in C++. Assigned problem of moving four progressively 
  13. larger rings sitting on a peg to another peg one ring at a time. The 
  14. object is to move the stack of rings to another peg. A small ring may be 
  15. placed upon a larger ring or an empty peg but not upon a larger ring. A 
  16. third peg is to facilitate this by temporarily holding rings. The 
  17. solution involves recursion but I am unable to figure out the algorithm. 
  18. Any thoughts?
  19.  
  20.